home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
as05_103.zip
/
AS05.MAN
< prev
next >
Wrap
Text File
|
1994-05-10
|
23KB
|
617 lines
Kingswood Software Development Tools AS05
-------------------------------------------------------------------------
NAME
as05 - optimizing assembler for M6805 microprocessor.
SYNOPSIS
as05 [-chlnopqstvwz] file
DESCRIPTION
This documentation is for as05 [1.03].
Copyright 1990-1994, Frank A. Vorstenbosch, Kingswood Software
AS05 is an optimizing assembler for the Motorola 6805 microprocessor.
It reads input from an ASCII text file, assembles this into memory, and
then writes a listing and a binary or hex file.
AS05 is case sensitive, not only does it differentiate between the
labels XYZ and xyz, but it also requires all (pseudo) instruction and
register names to be lower case. This way, the listing is the most
readable. Option -i can be used to make the assembler case insensitive.
OPTIONS
As05 recognizes the following options:
-c Show number of cycles per instruction in listing. This
decreases the number of columns available for listing by 5.
The number of cycles is printed between brackets [ and ].
-h<lines>
Specify height of page for listing. This option determines
the number of lines per printed page. Each page has a header
and is terminated by a form-feed character.
-i Ignore case in opcodes. In this way, the assembler does not
differentiate between 'add' and 'ADD', for example. Labels
are still case sensitive.
-l Generate pass 2 listing.
-l<filename>
Listing file name. The listing file is used for pass 1 and
pass 2 listing, for the symbol table (printed between the
two passes), and some statistics. When neither -p nor -t
is specified, and -l<filename> is given, then the assembler
automatically generates a pass 2 listing. When -p or -t is
specified, an additional -l should be given is a pass 2
listing is required.
-l Generate pass 2 listing.
-n Disable optimizations. When this option is specified no
optimizations will be done, even when the _opt_ pseudo-
instruction is used in the source code.
-o<filename>
Specify binary or s-records output file name. The assembler
automatically adds ".bin" for binary output or ".s19" for
s-records output when no extension is given.
-p Generate pass 1 listing. This may be used to examine any
optimizations/bugs generated in pass 2.
-q Quiet mode. No running line counter is displayed on standard
error output.
-s Write s-records instead of binary file. The s-records file
contains data for (only) the used memory; the binary file
begins at the lowest used address, and continues up to the
highest used address; filling unused memory between these
two addresses with either $ff or $00.
-s2 Write intel-hex file instead of binary file. The intel-hex
file contains data for (only) the used memory.
-t Generate symbol table. The symbol table is listed between
passes one and two, displaying the name, hexadecimal and
decimal value of each label, using 4-digit hexadecimal
numbers where possible, otherwise 8-digit numbers. The
decimal value is followed by an asterisk if the label is
redefinable (defined using _set_ instead of _equ_).
-v Verbose mode. More information is displayed on standard
output.
-w<width>
Specify column width. Normally, the listing is printed using
79 columns for output to a 80-column screen or printer. If
the -w option is given without a number following it, then
the listing will be 131 columns wide, otherwise it will be
the number of colulmns specified (between 60 and 200).
-z Fill unused memory with zeros. Normally when a binary file
is generated, unused bytes between the lowest and highest
used addresses are filled with $ff, the unprogrammed state
of EPROMs. If this is not wanted, the -z option can be used
to initialize this memory to $00. With s-records, unused
memory is not output to the file, and this option forces the
creation of an S9 (start address) record, even if no start
address is specified in the file with the _end_ pseudo-
instruction.
It is possible to discard any of the the output files by specifying
the name 'nul'.
EXPRESSIONS
The assembler recognizes most C-language expressions. The operators
are listed here in order of precedence, highest first:
() braces to group subexpressions
* current location counter
unary + - ! ~ unary + (no-operation), negation, logical NOT,
binary NOT
* / % multiplication, division, modulo
+ - addition, subtraction
<< >> shift left, shift right
< > <= >= comparison for greater/less than
= != comparison for equality (== can be used for =)
& binary AND
^ binary XOR
| binary OR
The logical NOT (!) evaluates to zero if the parameter is nonzero,
and vice versa. The binary NOT (~) complements all the bits in its
parameter.
Note: the asterisk is both used as the multiplication operator, and
as symbol for the current location. The assembler determines from
the context which is which. Thus:
5**
is a valid expression, evaluating to five times the current location
counter, and:
2+*/2
is too, evaluating to the current location counter divided by two, to
which two is added. In the same way, the % sign is both used as the
modulo operator and the prefix for binary numbers.
Numbers can be specified in any number base between 2 and 36.
Decimal numbers can be used without a prefix, hexadecimal numbers
can be prefixed by $, octal numbers by @, and binary numbers by %.
Other number bases can be used by using the following format:
<base>#<number>,
where the base is the number base to use (must be specified in
decimal), and number is the value. Thus:
1000 - decimal number, value 10*10*10=1000
%1000 - binary number, value 2*2*2=8
@1000 - octal number, value 8*8*8=512
$1000 - hexadecimal number, value 16*16*16=4096
2#1000 - binary number, value 2*2*2=8
4#1000 - base-4 number, value 4*4*4=64
7#1000 - base-7 number, value 7*7*7=343
36#1000 - base-36 number, value 36*36*36=444528
For number bases greater than 10, additional digits are represented
by letters, starting from A. Both lower and upper case letters can
be used.
11#aa = 120
16#ff = 255
25#oo = 624
36#zz = 1295
PSEUDO-INSTRUCTIONS
align <expression>
Align fills zero or more bytes with zeros until the new address
modulo <expression> equals zero. If the expression is not present,
align fills zero or one bytes with zeros until the new address
is even.
Example 1:
align 256 ; continue assembly on the
; next 256-byte page
Example 2:
align ; make sure table begins
Table dw 1,2,3 ; on an even address
bss
Put all assembled instructions and data in the code segment.
Only data pseudo-instructions can be used in the bss segment, and
these only increment the location counter. It is up to the programmer
to initialize the bss segment. The bss segment is especially
meaningful in a ROM based system where varia